<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/util_file/common.jspf"%>
<script src="/jeons/js/jeonsUtils.js" type="text/javascript"></script>
<script type="text/javascript">
	$(document).ready( function(){
		//전송
		$("#BtnEmailSend").click(function(){
			$.post('/jeons/email/Sendemail',$('#memberSendEmail').serialize(),function(data){
				alert('이메일전송');
			});  
		});  
		
		//전송
		$("#BtnEamilSubMit").click(function(){
			tmp = RandChars(8);
			$("[name=temppaswword]").val(tmp);
			$("#memberSendEmail").submit();
		}); 
		
		//랜덤숫자
		/* $("#BtnReandom").click( function(){
			tmp = RandChars(8);
			alert(tmp);
		});	  */
		
	/* 	$("#BtnEamilSubMit").click(function(){
			$("#memberSendEmail").submit();
		}); */
});
</script>
<div id="serch_result_sub">
<!-- <button type="button" id="BtnEamilSubMit">테스트</button> -->
<form:form commandName="memberSendEmail" id="memberSendEmail" method="post">
<form:input path="userno" value="${search_result.userno}"/>
<form:input path="username" value="${search_result.username}"/>
<form:input path="temppaswword" name="temppaswword"/>
<form:input path="tempemail"  value="${search_result.useremail}"/>
</form:form>
<table border="0" width="500px" height="50">
	<tr>
		<td colspan="3" bgcolor="#ffffff" height="1"></td>
	</tr>
	<tr>
		<th>아이디</th>
		<th>이름</th>
		<th>가입일</th>
	</tr>
	<c:if test="${search_result != null}">
	<tr>
		<td><B>${search_result.u_id}</B></td>
		<td>${search_result.username}</td>
		<td><fmt:formatDate value="${search_result.joindate}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
	</tr>
	<tr>
		<td colspan="3" bgcolor="#ffffff" height="1"></td>
	</tr>
	<tr>
		<td colspan="3" bgcolor="#000000" height="1"></td>
	</tr>
	<tr>
		<th>등록메일</th>
		<td>${search_result.useremail}</td>
		<td><button type="button" id="BtnEamilSubMit" clas="bt">보내기</button></td>
	</tr>
	<tr>
		<td colspan="3" bgcolor="#ffffff" height="1"></td>
	</tr>
	</c:if>
	<c:if test="${search_result == null}">
	<tr>
		<td colspan="3"><b>등록된 메일이 없습니다.</b></td>
	</tr>
	</c:if>
</table>


</div>
